package com.example.wakaka.locknlock;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class DetailActivity extends AppCompatActivity {
    private ListView listView;
    final List<Record> records = new ArrayList<Record>(){

    };
    final MyAdapter myAdapter = new MyAdapter(records,this);
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);
        listView = findViewById(R.id.listview);
        listView.setAdapter(myAdapter);
        final Record[] p = (Record[]) getIntent().getSerializableExtra("list");
        for(int i=0;i<p.length;i++)
        {
            records.add(p[i]);
        }



        myAdapter.notifyDataSetChanged();

    }
}
